Scheduling refactory#1154
Merged
fjtirado merged 1 commit intoserverlessworkflow:mainfrom Feb 12, 2026
Merged
Conversation
f25d9f4 to
a0f6b1a
Compare
mcruzdev
approved these changes
Feb 12, 2026
a0f6b1a to
a1ef2d3
Compare
These changes will make easier for implementor to reuse the event scheduling code Signed-off-by: fjtirado <ftirados@redhat.com>
a1ef2d3 to
bb3e07c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes will make easier for implementors to reuse the event scheduling code
The overall idea is that almost most implementors will have to provide a ScheduledExecutorService and override
everyandcronmethods, so a hierarchy of three classes has been defined accodinglyEventWorfklowScheduler is the top hierarchy and deal with the event part (which relies on Event comsuner), I do not expect this logic to be ever overriden, but who knows ;)
Then ExecutotServiceWorkflowScheduler depends on a provided ScheduledExecutorService, normally implementors that needs a different cron logic than the default one will extend this one and potentially override the every method to provide scheduling persistence (I do not expect after to be override because that one is a single timer that do not require complex handling, but it is also an option)
Finally, DefaultWorkflowScheduler provides the cron logic.